<?php

class Application_Model_CalendarEvents
{
	protected $_event_id;
	protected $_member_id;
    protected $_event_day;
    protected $_event_month;
    protected $_event_year;
    protected $_event_time;
    protected $_event_title;
    protected $_event_desc;

    public function __construct(array $options = null)
    {
        if (is_array($options)) {
            $this->setOptions($options);
        }
    }

    public function __set($name, $value)
    {
        $method = 'set' . $name;
        if (('mapper' == $name) || !method_exists($this, $method)) {
            throw new Exception('Invalid calendar_events property');
        }
        $this->$method($value);
    }

    public function __get($name)
    {
        $method = 'get' . $name;
        if (('mapper' == $name) || !method_exists($this, $method)) {
            throw new Exception('Invalid calendar_events property');
        }
        return $this->$method();
    }

    public function setOptions(array $options)
    {
        $methods = get_class_methods($this);
        foreach ($options as $key => $value) {
            $method = 'set' . ucfirst($key);
            if (in_array($method, $methods)) {
                $this->$method($value);
            }
        }
        return $this;
    }

    public function setEvent_id($id)
    {
        $this->_event_id = (int) $id;
        return $this;
    }

    public function getEvent_id()
    {
        return $this->_event_id;
    }
    
	public function setMember_id($id)
    {
        $this->_member_id = (string) $id;
        return $this;
    }

    public function getMember_id()
    {
        return $this->_member_id;
    }
    
    public function setEvent_day($text)
    {
        $this->_event_day = (int) $text;
        return $this;
    }

    public function getEvent_day()
    {
        return $this->_event_day;
    }
    
	public function setEvent_month($text)
    {
        $this->_event_month = (int) $text;
        return $this;
    }

    public function getEvent_month()
    {
        return $this->_event_month;
    }
    
	public function setEvent_year($text)
    {
        $this->_event_year = (int) $text;
        return $this;
    }

    public function getEvent_year()
    {
        return $this->_event_year;
    }
    
	public function setEvent_time($text)
    {
        $this->_event_time = (string) $text;
        return $this;
    }

    public function getEvent_time()
    {
        return $this->_event_time;
    }
    
	public function setEvent_title($text)
    {
        $this->_event_title = (string) $text;
        return $this;
    }

    public function getEvent_title()
    {
        return $this->_event_title;
    }
    
	public function setEvent_desc($text)
    {
        $this->_event_desc = (string) $text;
        return $this;
    }

    public function getEvent_desc()
    {
        return $this->_event_desc;
    }
}

